//
//  DataModel.m
//  __PRODUCTNAME__
//
//  Created by dllo on 16/08/17
//  Copyright (c) yh. All rights reserved.
//

#import "DataModel.h"
#import "SecDataModel.h"
#import "ActionModel.h"
@implementation DataModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [SecDataModel class]};
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SecDataModel *sec = [SecDataModel modelWithDic:dic];
            [array addObject:sec];
        }
        _data = array;
    }
}

@end
